package com.example.demo.account.controller;


import com.example.demo.account.service.ITblAccountService;
import io.seata.core.context.RootContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zgq
 * @since 2020-12-07
 */
@Slf4j
@RestController
@RequestMapping("/account")
public class TblAccountController {

    @Autowired
    ITblAccountService accountService;


    @PostMapping("/decAccount")
    public int decAccount(String userId, int amt){
        log.info("TblAccountController->decAccount:  userId->{}   amt->{} ",userId,amt);
        return accountService.decAccount(userId,amt);
        //return accountService.decAccount(userId, amt);
    }
}
